const express= require("express");
const body= require("body-parser");
const multer= require("multer");


//1.监听的端口
let server =express();
server.listen(8080);
//注册中间件
//为普通模式
//server.use(body.urlencoded({extended: false}));

//let multerObj=multer({dest: './upload/'});
//server.use(multerObj.any());

server.use("/a",function(req,res,next){
  console.log("aaa")
  next("/b");
})
server.use("/b",(req,res,next)=>{
  console.log("bb")
  res.send("OK2");
})
server.use("/a",(req,res,next)=>{
  console.log("aaaaa2")
  res.send("OK3");
})


//静态文件
server.use(express.static("./webapps/"));
